home *** CD-ROM | disk | FTP | other *** search
- #ifndef EGS_EGSGFX_H
- #define EGS_EGSGFX_H
-
- /***************************************************************************\
- *
- * $
- * $ FILE : egsgfx.h
- * $ VERSION : 1
- * $ REVISION : 4
- * $ DATE : 08-Dec-93 12:45
- * $
- * $ Author : mvk
- * $
- *
- *****************************************************************************
- * *
- * (c) Copyright 1990/94 VIONA Development *
- * All Rights Reserved *
- * *
- \***************************************************************************/
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
- #ifndef EXEC_PORTS_H
- #include <exec/ports.h>
- #endif
- #ifndef EXEC_LISTS_H
- #include <exec/lists.h>
- #endif
- #ifndef EXEC_SEMAPHORES_H
- #include <exec/semaphores.h>
- #endif
- #ifndef GRAPHICS_TEXT_H
- #include <graphics/text.h>
- #endif
- #ifndef EGS_EGS_H
- #include <egs/egs.h>
- #endif
- #ifndef EGS_EGSBLIT_H
- #include <egs/egsblit.h>
- #endif
- #ifndef EGS_EGSLAYERS_H
- #include <egs/egslayers.h>
- #endif
-
-
- /*
- * This library uses "egslayers.library" and "egsblit.library". It
- * standardizes the access to layers and BitMaps and makes their usage easier.
- *
- * The functions resemble in a great part those of the "graphics.library".
- * The basic structure is the RastPort which contains a layer, a BitMap
- * and/or a screen. All conventions are abided by (MouseOn..MouseOff,
- * LockLayer..UnlockLayer). You can clip with a layer and/or a region, just
- * as you like.
- *
- */
-
- /*
- * DrawModes
- *
- * States that define the color distribution for drawing operations.
- *
- * DRAW_APEN : You draw with the APen on transparent background.
- * DRAW_ABPEN : You draw with the APen in front and the BPen for the
- * background.
- * INVERT : You draw in inverting mode.
- *
- */
-
- /* Enumeration type DrawMode has 8 bits ! */
-
- #define EG_DRAW_APEN 0
- #define EG_DRAW_ABPEN 1
- #define EG_INVERT 2
-
- /*
- * EFont, EFontPtr
- *
- * Extension of the Amiga TextFont structure with additional information.
- * Created by "EG_OpenFont" and destroyed by "EG_CloseFont".
- *
- */
-
- typedef struct EG_EFont *EG_EFontPtr;
-
- struct EG_EFont {
- struct TextFont *Font;
- struct E_EBitMap EMap;
- };
-
- /*
- * PolyEntry, Polygon, PolyPtr
- *
- * Structures for polygons.
- */
-
- struct EG_PolyEntry {
- WORD X, Y;
- };
-
- typedef struct EG_PolyEntry EG_Polygon;
- typedef struct EG_PolyEntry *EG_PolyPtr;
-
- /*
- * AreaInfo, AreaInfoPtr
- *
- * Structure for Area commands, initialized by "EG_InitArea".
- *
- */
-
- typedef struct EG_AreaInfo *EG_AreaInfoPtr;
-
- struct EG_AreaInfo {
-
- EG_PolyPtr VctrTbl, VctrPtr, VctrLast;
- WORD Count, MaxCount;
- };
-
-
-
- /*
- * RastPort, RastPortPtr...
- *
- * Basic EGSGfx drawing structure:
- *
- * .BitMap : BitMap drawn into.
- * .Layer : Layer drawn into.
- * .Screen : Screen drawn into.
- *
- * .cp_x,
- * cp_y : Current drawing cursor, can be changed by "EG_Move" or direct
- * access.
- * .am_x,
- * .am_y : Current area cursor, must be changed by "EG_AreaMove".
- *
- * .APen : APen i.e. front pen.
- * .BPen : BPen i.e. pen for background.
- *
- * .Mode : Drawing mode (see above).
- * .Font : Current text font, can be changed by "EG_SetFont" or direct access.
- *
- * .Region : ClipRegion, must be changed by "EG_InstallClipRegion" or
- * "EG_RemoveClipRegion".
- * .FClip,
- * .BClip : PRIVATE !
- *
- * .CurvStep: Bezier curves are split up into small lines. This value
- * specifies the maximum length of such line segments.
- *
- * .TmpRas : Pointer to a one-planed BitMap that is to be used for Area
- * commands. If the BitMap is missing each Area operation
- * allocates its own BitMap and frees it after processing.
- *
- * .AreaInfo: AreaInfo structure.
- *
- * For reasons of compatibility no variables of the RastPort type may be
- * used or created. RastPorts can only be created by "EG_CreateRastPort" and
- * destroyed by "EG_DeleteRastPort".
- *
- */
-
- typedef struct EG_RastPort *EG_RastPortPtr;
-
- struct EG_RastPort {
-
- E_EBitMapPtr BitMap;
- EL_LayerPtr Layer;
- E_EScreenPtr Screen;
- WORD Depth;
- WORD cp_x, cp_y, am_x, am_y; /* Commodore */
- UWORD Pad_1;
- ULONG APen, BPen;
- UBYTE DrawMode;
- UBYTE Pad_2, Pad_3, Pad_4;
- EG_EFontPtr Font;
- EB_ClipRectPtr Region;
- EB_ClipRectPtr FClip, BClip;
- WORD CurvStep;
- UWORD Pad_5;
- E_EBitMapPtr TmpRas;
- EG_AreaInfoPtr AreaInfo;
- UBYTE AlgoStyle; /* Font style set has 8 bits */
- UBYTE Pad_6, Pad_7, Pad_8;
- ULONG Mask;
- LONG ClipKey;
- LONG Flags; /* No flags defined yet */
- };
-
- #endif /* EGS_EGSGFX_H */
-